package com.zhuss.controller.team;

import com.zhuss.bean.bo.team.answer.CreateAnswerBo;
import com.zhuss.bean.bo.team.question.DeleteQuestionBo;
import com.zhuss.bean.bo.team.question.UpdateQuestionBo;
import com.zhuss.common.BaseController;
import com.zhuss.common.OperateService;
import com.zhuss.exception.WpsException;
import com.zhuss.team.answer.AnswerOperateServiceExt;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: zhushanshuo
 * @Date: 2020/3/26 11:07
 */
@RestController
@RequestMapping("/answer")
public class AnswerOperateController extends BaseController {

    @Autowired
    @Qualifier("answerOperateService")
    private OperateService<Void, Object> answerOperateService;

    @Autowired
    @Qualifier("answerOperateServiceExt")
    private AnswerOperateServiceExt answerOperateServiceExt;

    /**
     * 新建
     * @throws WpsException
     */
    @ResponseBody
    @PostMapping("/create")
    public void create(@RequestBody CreateAnswerBo bo) throws WpsException {
        answerOperateService.create(bo);
    }

    /**
     * 修改
     * @param bo
     * @throws WpsException
     */
    @ResponseBody
    @PostMapping("/update")
    public void update(@RequestBody UpdateQuestionBo bo) throws WpsException {
        return;
    }

    /**
     * 删除
     * @throws WpsException
     */
    @ResponseBody
    @PostMapping("/delete")
    public void delete(@RequestBody DeleteQuestionBo bo) throws WpsException {
        return;
    }
}
